package cz.cvut.fit.web.nakupniSeznam.ws.conv;

import java.util.ArrayList;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

import cz.cvut.fit.web.nakupniSeznam.data.Unit;

@XmlRootElement(name = "root")
public class UnitsConverter {

	public UnitsConverter() {
		units = new ArrayList<UnitConverter>();

	}

	public UnitsConverter(java.util.List<Unit> input) {
		super();
		units = new ArrayList<UnitConverter>();
		
		for (Unit u : input) {
			this.units.add(new UnitConverter(u));
		}
	}

	private java.util.List<UnitConverter> units;
	
	@XmlElementWrapper 
	@XmlElement(name= "unit")
	public java.util.List<UnitConverter> getUnits() { 
		return units;
	}

}
